# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 0.10.0
    Contact: thegrumpydictator@gmail.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class RecurrenceTransactionUpdate(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'amount': 'float',
        'budget_id': 'int',
        'budget_name': 'str',
        'category_id': 'int',
        'category_name': 'str',
        'currency_code': 'str',
        'currency_id': 'int',
        'description': 'str',
        'destination_id': 'int',
        'destination_name': 'str',
        'foreign_amount': 'float',
        'foreign_currency_code': 'str',
        'foreign_currency_id': 'int',
        'source_id': 'int',
        'source_name': 'str'
    }

    attribute_map = {
        'amount': 'amount',
        'budget_id': 'budget_id',
        'budget_name': 'budget_name',
        'category_id': 'category_id',
        'category_name': 'category_name',
        'currency_code': 'currency_code',
        'currency_id': 'currency_id',
        'description': 'description',
        'destination_id': 'destination_id',
        'destination_name': 'destination_name',
        'foreign_amount': 'foreign_amount',
        'foreign_currency_code': 'foreign_currency_code',
        'foreign_currency_id': 'foreign_currency_id',
        'source_id': 'source_id',
        'source_name': 'source_name'
    }

    def __init__(self, amount=None, budget_id=None, budget_name=None, category_id=None, category_name=None, currency_code=None, currency_id=None, description=None, destination_id=None, destination_name=None, foreign_amount=None, foreign_currency_code=None, foreign_currency_id=None, source_id=None, source_name=None):  # noqa: E501
        """RecurrenceTransactionUpdate - a model defined in OpenAPI"""  # noqa: E501

        self._amount = None
        self._budget_id = None
        self._budget_name = None
        self._category_id = None
        self._category_name = None
        self._currency_code = None
        self._currency_id = None
        self._description = None
        self._destination_id = None
        self._destination_name = None
        self._foreign_amount = None
        self._foreign_currency_code = None
        self._foreign_currency_id = None
        self._source_id = None
        self._source_name = None
        self.discriminator = None

        self.amount = amount
        if budget_id is not None:
            self.budget_id = budget_id
        if budget_name is not None:
            self.budget_name = budget_name
        if category_id is not None:
            self.category_id = category_id
        if category_name is not None:
            self.category_name = category_name
        if currency_code is not None:
            self.currency_code = currency_code
        if currency_id is not None:
            self.currency_id = currency_id
        self.description = description
        if destination_id is not None:
            self.destination_id = destination_id
        if destination_name is not None:
            self.destination_name = destination_name
        self.foreign_amount = foreign_amount
        self.foreign_currency_code = foreign_currency_code
        self.foreign_currency_id = foreign_currency_id
        self.source_id = source_id
        if source_name is not None:
            self.source_name = source_name

    @property
    def amount(self):
        """Gets the amount of this RecurrenceTransactionUpdate.  # noqa: E501

        Amount of the transaction.  # noqa: E501

        :return: The amount of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: float
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this RecurrenceTransactionUpdate.

        Amount of the transaction.  # noqa: E501

        :param amount: The amount of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: float
        """
        if amount is None:
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

    @property
    def budget_id(self):
        """Gets the budget_id of this RecurrenceTransactionUpdate.  # noqa: E501

        Budget ID for this transaction.  # noqa: E501

        :return: The budget_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._budget_id

    @budget_id.setter
    def budget_id(self, budget_id):
        """Sets the budget_id of this RecurrenceTransactionUpdate.

        Budget ID for this transaction.  # noqa: E501

        :param budget_id: The budget_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """

        self._budget_id = budget_id

    @property
    def budget_name(self):
        """Gets the budget_name of this RecurrenceTransactionUpdate.  # noqa: E501

        Budget name for this transaction.  # noqa: E501

        :return: The budget_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._budget_name

    @budget_name.setter
    def budget_name(self, budget_name):
        """Sets the budget_name of this RecurrenceTransactionUpdate.

        Budget name for this transaction.  # noqa: E501

        :param budget_name: The budget_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._budget_name = budget_name

    @property
    def category_id(self):
        """Gets the category_id of this RecurrenceTransactionUpdate.  # noqa: E501

        Category ID for this transaction.  # noqa: E501

        :return: The category_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this RecurrenceTransactionUpdate.

        Category ID for this transaction.  # noqa: E501

        :param category_id: The category_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """

        self._category_id = category_id

    @property
    def category_name(self):
        """Gets the category_name of this RecurrenceTransactionUpdate.  # noqa: E501

        Category name for this transaction.  # noqa: E501

        :return: The category_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._category_name

    @category_name.setter
    def category_name(self, category_name):
        """Sets the category_name of this RecurrenceTransactionUpdate.

        Category name for this transaction.  # noqa: E501

        :param category_name: The category_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._category_name = category_name

    @property
    def currency_code(self):
        """Gets the currency_code of this RecurrenceTransactionUpdate.  # noqa: E501

        Submit either a currency_id or a currency_code.  # noqa: E501

        :return: The currency_code of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this RecurrenceTransactionUpdate.

        Submit either a currency_id or a currency_code.  # noqa: E501

        :param currency_code: The currency_code of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

    @property
    def currency_id(self):
        """Gets the currency_id of this RecurrenceTransactionUpdate.  # noqa: E501

        Submit either a currency_id or a currency_code.  # noqa: E501

        :return: The currency_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this RecurrenceTransactionUpdate.

        Submit either a currency_id or a currency_code.  # noqa: E501

        :param currency_id: The currency_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """

        self._currency_id = currency_id

    @property
    def description(self):
        """Gets the description of this RecurrenceTransactionUpdate.  # noqa: E501


        :return: The description of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this RecurrenceTransactionUpdate.


        :param description: The description of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

    @property
    def destination_id(self):
        """Gets the destination_id of this RecurrenceTransactionUpdate.  # noqa: E501

        ID of the destination account. Submit either this or destination_name.  # noqa: E501

        :return: The destination_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._destination_id

    @destination_id.setter
    def destination_id(self, destination_id):
        """Sets the destination_id of this RecurrenceTransactionUpdate.

        ID of the destination account. Submit either this or destination_name.  # noqa: E501

        :param destination_id: The destination_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """

        self._destination_id = destination_id

    @property
    def destination_name(self):
        """Gets the destination_name of this RecurrenceTransactionUpdate.  # noqa: E501

        Name of the destination account. Submit either this or destination_id.  # noqa: E501

        :return: The destination_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._destination_name

    @destination_name.setter
    def destination_name(self, destination_name):
        """Sets the destination_name of this RecurrenceTransactionUpdate.

        Name of the destination account. Submit either this or destination_id.  # noqa: E501

        :param destination_name: The destination_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._destination_name = destination_name

    @property
    def foreign_amount(self):
        """Gets the foreign_amount of this RecurrenceTransactionUpdate.  # noqa: E501

        Foreign amount of the transaction.  # noqa: E501

        :return: The foreign_amount of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: float
        """
        return self._foreign_amount

    @foreign_amount.setter
    def foreign_amount(self, foreign_amount):
        """Sets the foreign_amount of this RecurrenceTransactionUpdate.

        Foreign amount of the transaction.  # noqa: E501

        :param foreign_amount: The foreign_amount of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: float
        """

        self._foreign_amount = foreign_amount

    @property
    def foreign_currency_code(self):
        """Gets the foreign_currency_code of this RecurrenceTransactionUpdate.  # noqa: E501

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :return: The foreign_currency_code of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._foreign_currency_code

    @foreign_currency_code.setter
    def foreign_currency_code(self, foreign_currency_code):
        """Sets the foreign_currency_code of this RecurrenceTransactionUpdate.

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :param foreign_currency_code: The foreign_currency_code of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._foreign_currency_code = foreign_currency_code

    @property
    def foreign_currency_id(self):
        """Gets the foreign_currency_id of this RecurrenceTransactionUpdate.  # noqa: E501

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :return: The foreign_currency_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._foreign_currency_id

    @foreign_currency_id.setter
    def foreign_currency_id(self, foreign_currency_id):
        """Sets the foreign_currency_id of this RecurrenceTransactionUpdate.

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :param foreign_currency_id: The foreign_currency_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """

        self._foreign_currency_id = foreign_currency_id

    @property
    def source_id(self):
        """Gets the source_id of this RecurrenceTransactionUpdate.  # noqa: E501

        ID of the source account. Submit either this or source_name.  # noqa: E501

        :return: The source_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: int
        """
        return self._source_id

    @source_id.setter
    def source_id(self, source_id):
        """Sets the source_id of this RecurrenceTransactionUpdate.

        ID of the source account. Submit either this or source_name.  # noqa: E501

        :param source_id: The source_id of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: int
        """
        if source_id is None:
            raise ValueError("Invalid value for `source_id`, must not be `None`")  # noqa: E501

        self._source_id = source_id

    @property
    def source_name(self):
        """Gets the source_name of this RecurrenceTransactionUpdate.  # noqa: E501

        Name of the source account. Submit either this or source_id.  # noqa: E501

        :return: The source_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :rtype: str
        """
        return self._source_name

    @source_name.setter
    def source_name(self, source_name):
        """Sets the source_name of this RecurrenceTransactionUpdate.

        Name of the source account. Submit either this or source_id.  # noqa: E501

        :param source_name: The source_name of this RecurrenceTransactionUpdate.  # noqa: E501
        :type: str
        """

        self._source_name = source_name

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, RecurrenceTransactionUpdate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
